@import "@/common/styles/colors"

.speedtest
  margin-bottom: 2rem
  display: flex
  padding: 1.5rem 2rem
  border: $light-gray 2px solid
  background-color: $dark-gray
  border-radius: 15px
  justify-content: space-between
  width: 100%
  flex-wrap: wrap
  transition: all 0.5s
  animation: fadeIn 0.5s
  cursor: pointer
  user-select: none
  box-sizing: border-box

.speedtest:hover
  border: $green 2px solid

.speedtest-hidden
  visibility: hidden
  opacity: 0
  animation: fadeOut 0.3s

.speedtest-row
  display: flex
  align-items: center

.date
  display: flex
  align-items: center

.date-text
  margin: 0 0 0 1rem
  font-size: 24pt
  font-weight: 700
  color: $subtext

.speedtest-text
  margin: 0
  font-size: 28pt
  font-weight: 700
  color: $subtext

.tooltip-element
  position: relative

.tooltip-element .tooltip
  user-select: none
  pointer-events: none
  font-size: 16pt
  opacity: 0
  bottom: 120%
  left: 50%
  margin-left: -60px
  background-color: $dark-gray
  color: $subtext
  text-align: center
  border-radius: 6px
  padding: 5px 10px
  height: fit-content

  z-index: 90
  position: absolute
  transition: opacity 0.2s

.tooltip-bottom .tooltip
  bottom: 0
  top: 120%

.tooltip-element .tooltip-invisible
  visibility: hidden

.tooltip-element:hover .tooltip
  opacity: 1

@media (max-width: 900px)
  .tooltip-element .tooltip
    font-size: 14pt

@media (max-width: 730px)
  .tooltip-element .tooltip
    font-size: 11pt

@media (max-width: 605px)
  .speedtest
    flex-direction: column
  .date-text
    font-size: 32pt
  .speedtest-text
    font-size: 32pt

@media (max-width: 475px)
  .tooltip-element .tooltip
    font-size: 12pt
    padding: 5px 4px